package com.ddyx.rest;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddyx.service.VipService;
import com.ddyx.util.RequestForm;
import com.ddyx.util.ResponseForm;

/**
 * @ClassName: VipCenterController.java
 * @Description: vip助手相关接口
 * @author: liuhoujie
 * @date: 2018年3月23日
 */
@Controller
@RequestMapping("/mycenter")
public class VipCenterController {
	@Resource 
	VipService vipService;
	
	/**
	 * @DESC 获取个人中心相关数据
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "visitorAndGoodsCount" ,method = RequestMethod.POST) 
	public ResponseForm visitorAndGoodsCount(@RequestBody RequestForm param) {
		return vipService.visitorAndGoodsCount(param);
	}
	
	
	/**
	 * @desc 获取当前指定顾客浏览过的商品
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getLookGoods" ,method = RequestMethod.POST) 
	public ResponseForm getLookGoods(@RequestBody RequestForm param) {
		return vipService.getLookGoods(param);
	}
	
	
	/**
	 * @desc vip助手访客统计图
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getCartogram" ,method = RequestMethod.POST) 
	public ResponseForm getCartogram(@RequestBody RequestForm param) {
		return vipService.getCartogram(param);
	}
	
	/**
	 * @desc vip助手获取访客列表
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getVisitorList" ,method = RequestMethod.POST) 
	public ResponseForm getVisitorList(@RequestBody RequestForm param) {
		return vipService.getVisitorList(param);
	}
	
	
	/**
	 * @desc vip助手获取当前门店被浏览过的商品(时间倒序)
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getBrowsedGoods" ,method = RequestMethod.POST) 
	public ResponseForm getBrowsedGoods(@RequestBody RequestForm param) {
		return vipService.getBrowsedGoods(param);
	}
	
	
	/**
	 * @desc vip助手获取浏览过指定商品的用户(时间倒序)
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getCustomersByGood" ,method = RequestMethod.POST) 
	public ResponseForm getCustomersByGood(@RequestBody RequestForm param) {
		return vipService.getCustomersByGood(param);
	}
	
	
	/**
	 * @desc vip助手获取用户在当前门店浏览过的商品(时间倒序)
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getGoodsByCustomer" ,method = RequestMethod.POST) 
	public ResponseForm getGoodsByCustomer(@RequestBody RequestForm param) {
		return vipService.getGoodsByCustomer(param);
	}
	
	/**
	 * @desc vip助手获取预约用户列表
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getBookerList" ,method = RequestMethod.POST) 
	public ResponseForm getBookerList(@RequestBody RequestForm param) {
		return vipService.getBookerList(param);
	}
	
	/**
	 * @desc vip助手获取用户预约过的商品
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getGoodsByBooker" ,method = RequestMethod.POST) 
	public ResponseForm getGoodsByBooker(@RequestBody RequestForm param) {
		return vipService.getGoodsByBooker(param);
	}
	
	/**
	 * @desc vip助手获取当前门店被预约过商品
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getBookingGoodsByStore" ,method = RequestMethod.POST) 
	public ResponseForm getBookingGoodsByStore(@RequestBody RequestForm param) {
		return vipService.getBookingGoodsByStore(param);
	}
	
	/**
	 * @desc vip助手获取预约指定商品的用户
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "getBookersByGood" ,method = RequestMethod.POST) 
	public ResponseForm getBookersByGood(@RequestBody RequestForm param) {
		return vipService.getBookersByGood(param);
	}
}
